package psn.zjk.springboot;

import org.springframework.beans.BeansException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.annotation.ImportResource;

/**
 * @Description
 * @User zero
 * @Datetime 2021/5/15 21:08
 */
@SpringBootApplication
@ImportResource("classpath:conf/application.xml")
public class Test implements ApplicationContextAware {

    public static void main(String[] args) {
        SpringApplication.run(psn.zjk.springboot.Test.class);
    }


    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println(applicationContext.containsBean("xx"));
    }
}
